package com.bw.module_store.repo

import com.bw.lib_common.entity.BaseResponse
import com.bw.lib_common.model.BaseRepository
import com.bw.lib_http.OkHttpClientManager
import com.bw.module_store.api.StoreApiServer
import com.bw.module_store.entity.AddStoreParam
import com.bw.module_store.entity.AddStoreResult
import com.bw.module_store.entity.StoreDetailResult
import com.bw.module_store.entity.StoreResult
/**
 * 智慧园区-01-商家推荐-v1.1-吴熙-20250511
 */
class StoreRepo: BaseRepository<StoreApiServer>() {

    override fun createApiServer(): StoreApiServer = OkHttpClientManager.retrofitInstance.create(StoreApiServer::class.java)


    suspend fun getStoreList():BaseResponse<List<StoreResult>>{
        return apiService.getStoreList()
    }

    suspend fun getStoreDetail(storeId: Int):BaseResponse<StoreDetailResult>{
        return apiService.getStoreDetail(storeId)
    }

    suspend fun addStoreIn(storeParam: AddStoreParam):BaseResponse<AddStoreResult>{
        return apiService.addStoreIn(storeParam)
    }

    suspend fun getMerchantList():BaseResponse<List<AddStoreResult>>{
        return apiService.getMerchantList()
    }

    suspend fun getMerchantDetail(merchantId:Int):BaseResponse<AddStoreResult>{
        return apiService.getMerchantDetail(merchantId)
    }

}